<?php

	/**
	 * @see Bike_Js_Ext_ResponseHandler_Success
	 */
	require_once 'Bike/Js/Ext/ResponseHandler/Success.php';
	
	
	class Bike_Js_Ext_form_submit_Success extends Bike_Js_Ext_ResponseHandler_Success
	{
		/*protected function getDefaultSettings()
		{
			$js = $this->js();
			return $this->mergeDefaultSettings(parent::getDefaultSettings(), array(
				'args' => array($js->form, $js->action),
                'bodyAdapter' => array(	                
                	($js->isDebug()
		                ? $js->CodeContainer(array(
		                	$js->alert($js->action->response),
		                	$js->alert('Success'),
			                
		                ))
		                : ''),
                	$js->_var($js->response)->_val($js->action->response),
                	$js->_var($js->object)->_val($js->action->form),
                	$js->if($js->action->form->hasUpload()->_and($js->response->status->_isUndefined()))->_body(array(
                		$js->response->status->_val(200),
                	)),
                ),
			));
		}*/
		
		protected function initDefaultSettings()
		{
			parent::initDefaultSettings();
		
			$js = $this->js();
			$this->setSettings(array(
				'args' => array($js->form, $js->action),
                'bodyAdapter' => array(	                
                	($js->isDebug()
		                ? $js->CodeContainer(array(
		                	$js->alert($js->action->response),
		                	$js->alert('Success'),
			                /*$js->for($js->i->_in($js->action->form->owner))->_body(array(
			                	$js->alert($js->i->_add(' => ')->_add($js->action->form->owner[$js->i])),
			                )),/**/
		                	//$js->alert($js->action->form->loadMask),
		                ))
		                : ''),
                	$js->_var($js->response)->_val($js->action->response),
                	$js->_var($js->object)->_val($js->action->form),
                	$js->if($js->action->form->hasUpload()->_and($js->response->status->_isUndefined()))->_body(array(
                		$js->response->status->_val(200),
                	)),
                ),
			));
		}
	}
